const request = require('request');

exports.fn = async(ctx)=>{
	let params = ctx.query;
	let sql = `call stuLogout("${params.stuNum}")`;
	console.log(sql);
	try{
		let result = await ctx.mysql.query(sql);
		console.log(result);
		if(result==0){
			ctx.body = {err:"1 - stuLogout"}
		}else{
			ctx.body = result.affectedRows;
		}
	}catch(err){
		console.log(err);
		ctx.body = {err:'2 - stLuogout'};
	}
};